package com.asp.aspchain.account.request;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

public class CrtAccountReq implements Serializable {
	private static final long serialVersionUID = 1L;
	/*
	 * app标示
	 */
	@NotBlank(message="appmark不能为空")
	@Size(max=32)
	private String appmark;
	/*
	 * 证件号
	 */
	@NotBlank(message="identification不能为空")
	@Size(max=32)
	private String identification;
	/*
	 * 证件类型
	 */
	@NotBlank(message="idtype不能为空")
	@Pattern(regexp="[1-4]{1}",message="证件类型未定义")
	private String idtype;
	
	/*
	 * 手机号
	 */
	@Pattern(regexp="^[1][3,4,5,7,8][0-9]{9}$", message="手机号码不合法")
	private String phonenum;
	/*
	 * 账号密码
	 */
	@Size(max=16,message = "password，请设置在16个字符以内")
	private String password;
	/*
	 * Token类型
	 */
	@Size(max=4,message = "tokentype过长，请设置在4个字符以内")
	private String tokentype;
	/*
	 * Token值，默认充值，如果为0，标示不充值。
	 */
	
	private Integer tokenvalue;
	/*
	 * String，前面所有数字签名
	 */
	private String hmac;

	
	public String getAppmark() {
		return appmark;
	}
	public void setAppmark(String appmark) {
		this.appmark = appmark;
	}
	public String getIdentification() {
		return identification;
	}
	public void setIdentification(String identification) {
		this.identification = identification;
	}
	public String getIdtype() {
		return idtype;
	}
	public void setIdtype(String idtype) {
		this.idtype = idtype;
	}
	public String getPhonenum() {
		return phonenum;
	}
	public void setPhonenum(String phonenum) {
		this.phonenum = phonenum;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getTokentype() {
		return tokentype;
	}
	public void setTokentype(String tokentype) {
		this.tokentype = tokentype;
	}
	public Integer getTokenvalue() {
		return tokenvalue;
	}
	public void setTokenvalue(Integer tokenvalue) {
		this.tokenvalue = tokenvalue;
	}
	public String getHmac() {
		return hmac;
	}
	public void setHmac(String hmac) {
		this.hmac = hmac;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	@Override
	public String toString() {
		return "CreatAccountReq [appmark=" + appmark + ", identification=" + identification + ", idtype=" + idtype
				+ ", phonenum=" + phonenum + ", password=" + password + ", tokentype=" + tokentype + ", tokenvalue="
				+ tokenvalue + ", hmac=" + hmac + "]";
	}
	
	
}

